<template>
	<view class="setBox">
		<view class="setBox-bar">
			<text class="nickname-title">{{nickNameTitle}}</text>
			<view class="setBox-bar-right" @click="toOthers('name')">
				<text class="nickname">{{nickName}}</text>
				<u-icon class="setBox-bar-icon" name="arrow-right" width="18rpx" height="32rpx"></u-icon>
			</view>
		</view>
		<view class="splitline"></view>
		<view class="setBox-bar">
			<text class="nickname-title">{{UIDTitle}}</text>
			<view class="setBox-bar-right">
				<text class="nickname nickname-marginR">{{UID}}</text>
			</view>
		</view>
		<view class="splitline"></view>
		<view class="setBox-bar">
			<text class="nickname-title">{{telTitle}}</text>
			<view class="setBox-bar-right" @click="toOthers('phone')">
				<text class="nickname">{{tel}}</text>
				<u-icon class="setBox-bar-icon" name="arrow-right" width="18rpx" height="32rpx"></u-icon>
			</view>
		</view>
		<view class="splitline"></view>
		<view class="setBox-bar">
      <navigator url="/pages/auth/cert" hover-class="none">
        <text class="nickname-title">{{realName}}</text>
        <view class="setBox-bar-right">
        	<u-icon class="setBox-bar-icon" name="arrow-right" width="18rpx" height="32rpx"></u-icon>
        </view>
      </navigator>
		</view>
		<view class="splitline"></view>
		<view class="setBox-bar">
      <navigator url="/pages/auth/security/changePassword" hover-class="none">
        <text class="nickname-title">{{loginPWd}}</text>
        <view class="setBox-bar-right" @click="toOthers('pwd')">
          <u-icon class="setBox-bar-icon" name="arrow-right" width="18rpx" height="32rpx"></u-icon>
        </view>
      </navigator>
		</view>
		<view class="splitline"></view>
		<view class="setBox-bar">
      <navigator url="/pages/auth/security/changePassword" hover-class="none">
        <text class="nickname-title">{{transactionPwd}}</text>
        <view class="setBox-bar-right" @click="toOthers('trans-pwd')">
          <u-icon class="setBox-bar-icon" name="arrow-right" width="18rpx" height="32rpx"></u-icon>
        </view>
       </navigator>
		</view>
		<button class="exit-login">{{exitLogin}}</button>
	</view>
</template>

<script>
import { mapState, mapActions } from "vuex";
export default {
  data() {
  	return {
  		nickNameTitle:'昵称',
  		nickName:'庆余年',
  		UIDTitle:'UID',
  		UID:'M12345678',
  		telTitle:'手机号',
  		tel:'158******62',
  		realName:'实名认证',
  		loginPWd:'登录密码',
  		transactionPwd:'交易密码',
  		exitLogin:'退出登录'
  	}
  },
  methods: {
    handleNavBack() {
      uni.navigateBack();
    },
    toOthers(str){
    		uni.navigateTo({
    			url:str
    		})
    }
  },
  computed: {
    ...mapState("user", ["user"]),
  },
  onLoad() {
    if (!this.user) this.loadUser();
  },
  methods: {
    ...mapActions("user", ["loadUser"]),
  },
};
</script>

<style lang="scss">
	page{
		background-color: #F5F5F5;
	}
	.setBox{
		width: 750rpx;
		height: 730rpx;
		background-color: #fff;
		margin-top: 30rpx;
		.setBox-bar{
			display: flex;
			height: 120rpx;
			align-items: center;
			justify-content: space-between;
			.nickname-title{
				font-size: 32rpx;
				margin-left: 24rpx;
			}
			.nickname{
				font-size: 32rpx;
			}
			.nickname-marginR{
				margin-right: 24rpx;
			}
			.setBox-bar-icon{
				margin-left: 10rpx;
				color: #a1a1a1;
				margin-right: 24rpx;
			}
		}
		.splitline{
			width: 726px;
			height: 2px;
			background: #F5F5F5;
			margin: 0 auto;
		}
		.exit-login{
			height: 88rpx;
			line-height: 88rpx;
			font-size: 32rpx;
			font-family: Adobe Heiti Std;
			margin-top: 60rpx;
			background-color: #fff;
			border-radius: 0rpx;
		}
		.exit-login::after{
			border: none;
		}
	}
</style>
